import request from "@/utils/request.js"
export const doLogin = (params) => {
	return request({
		url: "/sysuser/checklogin",
		method: "get",
		params
	})
}

export const getSaleDepartment = (com_party_id) => {
	return request({
		url: "/client/saledepartment",
		method: "get",
		params: {
			com_party_id
		}
	})
}
export const searchKh = (cname, userid) => {
	return request({
		url: "/client/search",
		method: "post",
		params: {
			cname,
			userid
		}
	})
}
// 下载
export const downloadHx = (params) => {
	return request({
		url: "/client/downloadinvoice",
		method: "get",
		params
	})
}
export const writeOff = (params) => {
	return request({
		url: "/client/saveinvoice",
		method: "post",
		data: params
	})
}

// 查询认款
export const subQuery = (params)=>{
	return request({
		url:"/client/searchshoukuan",
		method:"post",
		params
	})
}

// 查询
export const save=(params)=>{
	return request({
		url: "/chongcha/dengji/save",
		method: "get",
		params
	})
}

// 冲差管理 登记搜索

export const searchDengji = (params) => {
	return request({
		url: "/chongcha/dengji/search",
		method: "get",
		params:params
	})
}

// 冲差管理 修改数量
export const updateDengji = (params) => {
	return request({
		url: "/chongcha/dengji/save",
		method: "get",
		params
	})
}

// 冲差管理 证明生成 搜索
export const searchZhengming = (params) => {
	return request({
		url: "/chongcha/shengcheng/search",
		method: "get",
		params
	})
}

// 冲差管理 证明生成
export const generateZhengming = (params) => {
	return request({
		url: "/chongcha/shengcheng/save",
		method: "get",
		params
	})
}

// 冲差管理 证明上传 搜索
export const searchShangchuan = (params) => {
	return request({
		url: "/chongcha/shangchuan/search",
		method: "get",
		params
	})
}

// 冲差管理 证明上传 上传 明细
export const uploadMingxi = (params) => {
	return request({
		url: "/chongcha/shangchuan/mingxi",
		method: "get",
		params
	})
}

// 冲差管理 证明上传 上传 图片上传
export const uploadImage = (params) => {
	return request({
		url: "/chongcha/shangchuan/upload",
		method: "post",
		data: params
	})
}

// 上传图片后调用
export const saveImage = (params) => {
  return request({
    url: `/liandong/upload/fujiachuli?user_id=${params.user_id}&inv=${params.inv}&typename=${params.typename}
	&ls_invoice_id=${params.ls_invoice_id}&ls_file_name=${params.ls_file_name}`,
    method: "post"
  })
}

// 联动查询管理 联动品种流行查询 查询
export const searchLiandong = (params) => {
	return request({
		url: "/liandong/liuxiang/query",
		method: "get",
		params
	})
}

//冲差管理 证明上传 查看按钮调用的接口
export const viewImage = (params) => {
  return request({
	url: `/chongcha/shangchuan/chakan`,
	method: "get",
	params
  })
}